home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / bbs / qb281cz2.zip / STRUCT.ZIP / BSTRUCT.280 next >
Text File  |  1996-05-30  |  31KB  |  843 lines

  1.  
  2. 'FILE MAY BE DISTRIBUTED UNMODIFIED/UNALTERED IN ORIGINAL RELEASE ARCHIVE.
  3.  
  4. '****************************************************************************
  5. '*                                                                          *
  6. '* BSTRUCT.280 written by James Goldbloom for Matrix Technology (tm) (C)    *
  7. '*                                                                          *
  8. '* BASIC source structures for QuickBBS version 2.80 Zeta-2 converted from  *
  9. '* Turbo Pascal for free use by any party to write utilities and other      *
  10. '* software which enhances the use of the QuickBBS software.  Use of this   *
  11. '* information in any other BBS program is strictly prohibited.             *
  12. '*                                                                          *
  13. '* Contact Information:  denied1@blkcat.com (James Goldbloom)               *
  14. '*                       1:109/611 (Fidonet network)                        *
  15. '*                                                                          *
  16. '* Original Turbo Pascal structures courtesy of Matrix Technology,          *
  17. '* Copyright 1991-1996 by Matrix Technology, All Rights Reserved.           *
  18. '*                                                                          *
  19. '****************************************************************************
  20.  
  21. 'Caveats and Notes to BASIC Developers, PLEASE READ:
  22. '
  23. 'All conversions are as generic as possible, and suggested BASICS are
  24. 'compiled basics such as Power Basic, Quick Basic, Lora, or Visual Basic.
  25. '
  26. 'Most original comments are preserved from the Turbo Pascal structures
  27. 'and are prefixed with "(*" and suffixed with "*)".  Additional comments by
  28. 'James Goldbloom, to aid in understanding and utilizing the structures,
  29. 'are prefixed by "<--".  ALL comments are prefixed with "'".  Any instance
  30. 'of "(?)" in comments signifies undocumented or unsupported structures.
  31. 'These structures were developed for use with FUNCTIONS and CODE SNIPPETS
  32. 'included in the release archive of BSTRUCT.ZIP.  Please consult the
  33. 'SAMPLEx.BAS/FUNCTION.BAS files, where "x" denotes sample number, to help
  34. 'with string conversion, data type conversion, CRC32 conversion, date
  35. 'conversion, and other exemplified ways of accessing QuickBBS data files.
  36. 'All *.BAS source files are freeware and may be unconditionally used.
  37. 'Please write James Goldbloom at any of the addresses listed above for
  38. 'corrections, addendums, requests, and/or source you are proud to share!
  39.  
  40. 'See FUNCTION.BAS for conversion of strings and other data types critical
  41. 'to the structures presented in this file, BSTRUCT.280, since Turbo
  42. 'Pascal stores these data types differently than BASIC in many regards.
  43.  
  44.  
  45. '----------------------- Begin Structures Now -------------------------
  46.  
  47. '[First, determine which version of your source to create: Classic/Goldbase]
  48.  
  49. %GOLDBASE=0  '<--Set this constant to 0 (False) for Classic or 1 (True)
  50.              '   for Goldbase compilation/interpretation.
  51.  
  52. $IF %GOLDBASE
  53.   MaxMsgAreas=500
  54.   FileExt$=".DAT"
  55. $ELSE
  56.   MaxMsgAreas=200
  57.   FileExt$=".BBS"
  58. $ENDIF
  59.   MaxFileAreas&=200  '<--Use LONG integer since areas <= INFINITY possible!
  60.   MaxLanguages=30
  61.   MaxEvents=30
  62.   MaxProtocols=20
  63.  
  64. '[All sections to follow are for data records and data types]
  65.  
  66. TYPE FlagType '<--Used to store 32 flag settings - one byte stores 8 bits
  67.               '   and each bit constitues each boolean flag (see below)
  68.  
  69.   A_Flags as Byte  '<--Bits 0 thru 7 storing Flags A1 thru A8
  70.   B_Flags as Byte  '<--Bits 0 thru 7 storing Flags B1 thru B8
  71.   C_Flags as Byte  '<--Bits 0 thru 7 storing Flags C1 thru C8
  72.   D_Flags as Byte  '<--Bits 0 thru 7 storing Flags D1 thru D8
  73.  
  74. END TYPE
  75.  
  76. TYPE UserIdxRecord  '<--(Record) {USERIDX.BBS or USERIDX.DAT}
  77.  
  78.   NameCRC  as Long  '<--CRC32 value storing user name
  79.   AliasCRC as Long  '<--CRC32 value storing user alias
  80.  
  81. END TYPE
  82.  
  83. TYPE UserRecord  '<-- (Record) {USERS.BBS or USERS.DAT}
  84.  
  85.   Name          as String * 36
  86.   City          as String * 26
  87.   ReservedZero  as Byte  '<--Reserved byte field, should always be 0
  88.   Language      as Byte
  89.   PwdCrc        as Long
  90.   PwdChangeDate as Word
  91.   ExpireDate    as Word  '<--Number of days since 1/1/1900
  92. $IF %GOLDBASE
  93.   HighMsgRead   as Long
  94. $ELSE
  95.   UnusedSpace   as Long  '<--See HighMsgRead below for CLASSIC data type
  96. $ENDIF
  97.   Attrib2       as Byte  '<--See bit settings comment section below
  98.   ExtraSpace    as Byte
  99.   DataPhone     as String * 13
  100.   HomePhone     as String * 13
  101.   LastTime      as String * 6
  102.   LastDate      as String * 9
  103.   Attrib        as Byte  '<--See bit settings comments section below
  104.   Flags         as FlagType  '<--See structure definition above
  105.   Credit        as Word
  106.   Pending       as Word
  107. $IF %GOLDBASE
  108.   TimesPosted   as Word
  109.   ObsoleteField as Word
  110. $ELSE
  111.   TimesPosted   as Word
  112.   HighMsgRead   as Word
  113. $ENDIF
  114.   SecLvl        as Word
  115.   Times         as Word
  116.   Ups           as Word
  117.   Downs         as Word
  118.   UpK           as Word
  119.   DownK         as Word
  120.   TodayK        as Integer
  121.   Elapsed       as Integer
  122.   LineLength    as Integer
  123.   CombinedPtr   as Word  '(* Record number in COMBINED.BBS *)
  124.                          '(* Note: 0 signifies no combined record assigned *)
  125.  
  126.   AliasPtr      as Word  '(* Record number in ALIAS.BBS *)
  127.                          '(* Note: 0 signifies no alias record assigned *)
  128.   Birthday      as Long  '<--Number of days since 1/1/1900
  129.  
  130. END TYPE
  131.  
  132. ' Defined BIT settings for "Attrib" byte within "UserRecord":
  133. '
  134. ' (If bit value is 0, setting is "False", otherwise setting is "True")
  135. '
  136. '      Bit 0: Deleted  <--Marked for deletion toggle
  137. '      Bit 1: Screen Clear Codes
  138. '      Bit 2: More Prompt
  139. '      Bit 3: ANSI
  140. '      Bit 4: No-Kill
  141. '      Bit 5: Ignore Download Hours
  142. '      Bit 6: ANSI Full Screen Editor
  143. '      Bit 7: Sex (0=male, 1=female)
  144. '
  145. ' Defined BIT settings for "Attrib2" byte within "UserRecord":
  146. '
  147. ' (If bit value is 0, setting is "False", otherwise setting is "True")
  148. '
  149. '      Bit 0: Guest Account (No Password Needed)
  150. '      Bit 1: SSR Configured
  151. '      Bit 2: Not Defined Yet (Should be False/0)
  152. '      Bit 3: Not Defined Yet (Should be False/0)
  153. '      Bit 4: Not Defined Yet (Should be False/0)
  154. '      Bit 5: Not Defined Yet (Should be False/0)
  155. '      Bit 6: Not Defined Yet (Should be False/0)
  156. '      Bit 7: Not Defined Yet (Should be False/0)
  157.  
  158. TYPE UserActivityType  '<--Used within UserRecord
  159.  
  160.   Activity as Byte
  161.  
  162.   'Byte values (mapped to language data/QBBS variables for USERON.BBS):
  163.   '
  164.   ' 0=InMenu                   9=DownloadingFile
  165.   ' 1=InDoor                  10=UploadingFile
  166.   ' 2=InCallback              11=ViewingFileList
  167.   ' 3=ReadingMessages         12=DoingFileSearch
  168.   ' 4=WritingMessage          13=LoggingOn
  169.   ' 5=ChattingWithSysOp       14=LoggingOff
  170.   ' 6=ChattingWithUsers       15=WaitingForCall
  171.   ' 7=AnsweringQuestionaire
  172.   ' 8=ViewingTextFile
  173.  
  174. END TYPE
  175.  
  176. TYPE USERONrecord  '<--(Record) {USERON.BBS}
  177.  
  178.   UO_Name           as String * 36
  179.   UO_Alias          as String * 36
  180.   UO_Line           as Byte
  181.   UO_Baud           as Word
  182.   UO_City           as String * 26
  183.   UO_DoNotDisturb   as Byte  '<--Boolean setting (0=False,1=True)
  184.   UO_Conference     as Byte
  185.   UO_Activity       as UserActivityType  '<--See related comments above
  186.   UO_Language       as Byte
  187.   UO_Spare          as String * 8  '<--Bytes 2 thru 9 are padding nulls
  188.  
  189. END TYPE
  190.  
  191.  
  192. TYPE AliasRecord  '<--(Record) {ALIAS.BBS}
  193.  
  194.   AR_Alias as String * 36  '<--Alias name, or display as "(None)" if nulled
  195.  
  196.   '(* Note: record 0 of ALIAS.BBS is a placeholder only, and contains no
  197.   '   information. *)
  198.  
  199. END TYPE
  200.  
  201.  
  202. TYPE MsgToIdxRecord  '<--(Record) {MSGTOIDX.BBS or MSGTOIDX.DAT}
  203.  
  204.   MTIR_Name as String * 36  '<--User name to whom message is addressed,
  205.                             '   used during search for new mail to user.
  206.                             '   Points to record within other data file(s)
  207.                             '   such as MSGHDR.DAT/MSGHDR.BBS which store
  208.                             '   information about the message.
  209. END TYPE
  210.  
  211. TY